package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.ViphallCommentMapper;
import com.ktgj.service.domain.ViphallComment;
import com.ktgj.service.service.IViphallCommentService;

/**
 * 贵宾厅评论Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-22
 */
@Service
public class ViphallCommentServiceImpl implements IViphallCommentService 
{
    @Autowired
    private ViphallCommentMapper viphallCommentMapper;

    /**
     * 查询贵宾厅评论
     * 
     * @param commentId 贵宾厅评论ID
     * @return 贵宾厅评论
     */
    @Override
    public ViphallComment selectViphallCommentById(Long commentId)
    {
        return viphallCommentMapper.selectViphallCommentById(commentId);
    }

    /**
     * 查询贵宾厅评论列表
     * 
     * @param viphallComment 贵宾厅评论
     * @return 贵宾厅评论
     */
    @Override
    public List<ViphallComment> selectViphallCommentList(ViphallComment viphallComment)
    {
        return viphallCommentMapper.selectViphallCommentList(viphallComment);
    }

    /**
     * 新增贵宾厅评论
     * 
     * @param viphallComment 贵宾厅评论
     * @return 结果
     */
    @Override
    public int insertViphallComment(ViphallComment viphallComment)
    {
        viphallComment.setCreateTime(DateUtils.getNowDate());
        return viphallCommentMapper.insertViphallComment(viphallComment);
    }

    /**
     * 修改贵宾厅评论
     * 
     * @param viphallComment 贵宾厅评论
     * @return 结果
     */
    @Override
    public int updateViphallComment(ViphallComment viphallComment)
    {
        return viphallCommentMapper.updateViphallComment(viphallComment);
    }

    /**
     * 批量删除贵宾厅评论
     * 
     * @param commentIds 需要删除的贵宾厅评论ID
     * @return 结果
     */
    @Override
    public int deleteViphallCommentByIds(Long[] commentIds)
    {
        return viphallCommentMapper.deleteViphallCommentByIds(commentIds);
    }

    /**
     * 删除贵宾厅评论信息
     * 
     * @param commentId 贵宾厅评论ID
     * @return 结果
     */
    @Override
    public int deleteViphallCommentById(Long commentId)
    {
        return viphallCommentMapper.deleteViphallCommentById(commentId);
    }

    @Override
    public List<ViphallComment> queryComment(Long viphallId) {
        List<ViphallComment> viphallComments = viphallCommentMapper.queryComment(viphallId);
        return viphallComments;
    }
}
